﻿using System;

namespace File.Api.Models
{
    public class IQCOrderDetailModel
    {
        public string Id { get; set; }

        /// <summary>
        /// 检验单
        /// </summary>
        public string OrderId { get; set; }

        public string OrgId { get; set; }

        public DateTime? CreateTime { get; set; }

        /// <summary>
        /// 来料编号
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 供应商编号
        /// </summary>
        public string ProviderCode { get; set; }

        public string ProviderId { get; set; }

        /// <summary>
        /// 检验结果
        /// </summary>
        public int CheckStatus { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        public int OrderStatus { get; set; }

        /// <summary>
        /// sap 供应商名称
        /// </summary>
        public string ProviderName { get; set; }

        /// <summary>
        /// 采购凭证号
        /// </summary>
        public string PurchasingCode { get; set; }

        /// <summary>
        /// 采购凭证的项目编号
        /// </summary>
        public string PurchasingRow { get; set; }

        /// <summary>
        /// 销售订单编号
        /// </summary>
        public string SaleCode { get; set; }

        /// <summary>
        /// 库位
        /// </summary>
        public string WarehouseCode { get; set; }

        public string OrgCode { get; set; }

        /// <summary>
        /// 销售订单项目编号
        /// </summary>
        public string SaleRow { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }

        public string ProductId { get; set; }

        public string ProductCode { get; set; }

        public string ProductName { get; set; }

        /// <summary>
        /// 到货数量
        /// </summary>
        public decimal ArrivalQty { get; set; }

        public string CustomerName { get; set; }

        public DateTime? CheckTime { get; set; }

        public string AreaName { get; set; }

        public string AreaId { get; set; }

        /// <summary>
        /// 特采单号
        /// </summary>
        public string DeviationCode { get; set; }

        /// <summary>
        /// 是否触发特采
        /// </summary>
        public bool IsDeviation { get; set; }

        /// <summary>
        /// MES最终检验结果
        /// </summary>
        public int Result { get; set; }

        public string SendQcOrderId { get; set; }

        /// <summary>
        /// IsSyncData （0:否 1:是）
        /// </summary>
        public int IsSapsync { get; set; }

        /// <summary>
        /// sap检验结果
        /// </summary>
        public int SapCheckResult { get; set; }

        /// <summary>
        /// Sap到料时间
        /// </summary>
        public DateTime? SapCreateTime { get; set; }

        /// <summary>
        /// Sap检验时间
        /// </summary>
        public DateTime? SaCheckTime { get; set; }

        /// <summary>
        /// 是否为免检单（0:否 1:是）
        /// </summary>
        public int IsExemption { get; set; }

        /// <summary>
        /// 免检变动人
        /// </summary>
        public string ExemptionUserId { get; set; }

        /// <summary>
        /// 免检变动时间
        /// </summary>
        public DateTime? ExemptionTime { get; set; }

        /// <summary>
        /// 同步数量  仅在有外部同步时使用
        /// </summary>
        public decimal SyncQty { get; set; }

        /// <summary>
        /// 接受数
        /// </summary>
        public decimal ReceivedQty { get; set; }

        /// <summary>
        /// 是否新品
        /// </summary>
        public bool IsNew { get; set; }

        /// <summary>
        /// 是否急料
        /// </summary>
        public bool IsUrgent { get; set; }

        public string ChangeResultUser { get; set; }

        public DateTime? ChangeResultTime { get; set; }

        public string ExemptionRemark { get; set; }

        /// <summary>
        /// 是否合格供应商--0-合格，1-不合格
        /// </summary>
        public int IsQualified { get; set; }

        /// <summary>
        /// 是否合格合宜供应商--0-合格，1-不合格
        /// </summary>
        public int IsHeyiQualified { get; set; }

        public string ProductGroup { get; set; }

        public int RuleType { get; set; }

        /// <summary>
        /// OQC是否回写结果回sap
        /// </summary>
        public bool IsUpdateSap { get; set; }

        public int OrderType { get; set; }

        public string StorageCode { get; set; }

        /// <summary>
        /// 生产日期
        /// </summary>
        public string MfgDate { get; set; }
    }
}
